package hcn.protocol.brandnew.feiyong.feiyongqingdan;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 出院带药信息查询 - ODS_04030007_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class MIrefundAllResponse {

    /**
     * 出院带药LIST
     */
    @XmlElementWrapper(name = "RequestLists")
    @XmlElement(name = "RequestList")
    private List<RequestList> requestLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class DetailsItemsdetailsItem {

        /**
         * 药物代码
         */
        @XmlElement(name = "DrugsNumber")
        private String drugsNumber;
        /**
         * 药物名称
         */
        @XmlElement(name = "DrugName")
        private String drugName;
        /**
         * 药物类型代码
         */
        @XmlElement(name = "DrugType")
        private String drugType;
        /**
         * 药物使用次剂量
         */
        @XmlElement(name = "OnceDosage")
        private String onceDosage;
        /**
         * 药物使用剂量单位
         */
        @XmlElement(name = "DrugUseDoseUnit")
        private String drugUseDoseUnit;
        /**
         * 一次总数量
         */
        @XmlElement(name = "OnceTotalNumber")
        private String onceTotalNumber;
        /**
         * 药品-使用频次代码
         */
        @XmlElement(name = "UsageFrequency")
        private String usageFrequency;
        /**
         * 药品用法名称
         */
        @XmlElement(name = "DrugUsePathwaysName")
        private String drugUsePathwaysName;
        /**
         * 药品-药房规格
         */
        @XmlElement(name = "DrugstoreSpec")
        private String drugstoreSpec;
        /**
         * 明细项目单价(元)
         */
        @XmlElement(name = "DrugUnitPrice")
        private String drugUnitPrice;
        /**
         * 数量单位
         */
        @XmlElement(name = "TotalNumberUnit")
        private String totalNumberUnit;
        /**
         * 中药饮片剂数
         */
        @XmlElement(name = "PiecesChineseMedicineAgentNumb")
        private Byte piecesChineseMedicineAgentNumb;
        /**
         * 处方药品金额
         */
        @XmlElement(name = "DrugTotalCost")
        private String drugTotalCost;
        /**
         * 草药煎法代码
         */
        @XmlElement(name = "HerbalMedicineDecoction")
        private Integer herbalMedicineDecoction;
        /**
         * 医嘱备注信息
         */
        @XmlElement(name = "AdviceNote")
        private String adviceNote;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 就诊标识
         */
        @XmlElement(name = "VisitID")
        private String visitID;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 年龄
         */
        @XmlElement(name = "PatientAge")
        private String patientAge;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 入院日期
         */
        @XmlElement(name = "AdmissionDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date admissionDateTime;
        /**
         * 出院日期时间
         */
        @XmlElement(name = "DischargeDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date dischargeDateTime;
        /**
         * 住院科室名称
         */
        @XmlElement(name = "VisitDeptName")
        private String visitDeptName;
        /**
         * 病床号
         */
        @XmlElement(name = "SickbedId")
        private String sickbedId;
        /**
         * 出院诊断编码
         */
        @XmlElement(name = "DischargeDiagnoseCode")
        private String dischargeDiagnoseCode;
        /**
         * 医嘱项目明细
         */
        @XmlElementWrapper(name = "DetailsItemsdetailsItems")
        @XmlElement(name = "DetailsItemsdetailsItem")
        private List<DetailsItemsdetailsItem> detailsItemsdetailsItems;
    }

}
